package operands;

import instructions.Instruction;

public class IndirectAFieldOperand extends Operand
{

	public IndirectAFieldOperand(int value) 
	{
		super(value);
	}
	
	@Override
	public int resolve()
	{
		return memory.getInstruction(instruction.getAddres() + value).getOperandA().resolve();
	}

	@Override
	public Operand copy() 
	{
		return new IndirectAFieldOperand(value);
	}

	@Override
	public Instruction resolveInstruction() {
		return memory.getInstruction(resolve());
	}
}
